package com.example.mntz.QuartzJob;

import com.example.mntz.dao.AccountMapper;
import com.example.mntz.model.Classs;
import org.quartz.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;

public class AccJob extends QuartzJobBean  {
    @Autowired
    AccountMapper mapper;
    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) {

        JobDataMap jobDataMap = jobExecutionContext.getMergedJobDataMap();
        // 业务逻辑
        String key = jobExecutionContext.getJobDetail().getKey().getName();
        Classs c = mapper.selectbq(null,Integer.valueOf(key));

        mapper.insertdsAcc(c);
        System.out.println(c.getClassZq());

    }
}